// pages/user/user.js
Page({

    /**
     * 页面的初始数据
     */
    data: {
        userInfo:{},
        collectNumber:0,
        isActive:false,
        latitude: 30.306237,
        longitude: 120.356893,
        markers: [{
        id: 1,
        latitude: 30.306237,
        longitude: 120.356893,
        name: 'T.I.T 创意园'
        }]
    },

    onShow: function (options) {
        const userInfo = wx.getStorageSync("userInfo");
        const collect = wx.getStorageSync("collect")||[];
        
        this.setData({
            userInfo,
            collectNumber:collect.length
        })
    },
    handlePhone(){
        wx.makePhoneCall({
            phoneNumber: "400400400"
        });
    },
    handleOpen(){
        const {isActive} = this.data
        this.setData({
            isActive:!isActive
        })
    }
})